<template>
  <div id="app">
    <router-view/>
    <Tabbar :items="items" :defaultSelectIndex="0"
    v-show="this.$route.meta.isShowTab"/>
  </div>
</template>

<script>
import Tabbar from "./components/tabbar/Tabbar";
export default {
  components:{
    Tabbar
  },
  data(){
    return{
      items:[
        {
          title:"首页",
          icon:require("./assets/home.png"),
          icon_active:require("./assets/home_active.png"),
          path:"/"
        },
        {
          title:"分类",
          icon:require("./assets/category.png"),
          icon_active:require("./assets/category_active.png"),
          path:"/category"
        },
        {
          title:"购物车",
          icon:require("./assets/cart.png"),
          icon_active:require("./assets/cart_active.png"),
          path:"/cart"
        },
        {
          title:"我的",
          icon:require("./assets/mine.png"),
          icon_active:require("./assets/mine_active.png"),
          path:"/mine"
        }
      ]
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
</style>
